#ifndef COMPANYMANAGEMENT_H
#define COMPANYMANAGEMENT_H

#include "global.h"
#include <QWidget>
#include <QVector>

namespace Ui {
class CompanyManagement;
}

class QComboBox;

class CompanyManagement : public QWidget
{
    Q_OBJECT

public:
    explicit CompanyManagement(QSqlDatabase &, QWidget * = 0, Qt::WindowFlags = Qt::Dialog);
    ~CompanyManagement();

protected:
    void showEvent(QShowEvent *);

private:    
    Ui::CompanyManagement *ui;    
    QSqlQuery query;
    void setupComboBoxes();
    void setupComboBox(QComboBox *, const QString &, const QString &);
private slots:
    void onCompanyChanged(QString);
    void onPlatformChanged(QString);
    void onLoginChanged(QString);
    void onPasswordChanged(QString);
    void onUpdateCompanyInfo();
    void onUpdatePlatformInfo();
    void onUpdateLoginInfo();
    void onUpdatePasswordInfo();
};

#endif // COMPANYMANAGEMENT_H
